﻿<div ng-controller="merchantController">
	<div class="wrapper border-bottom white-bg page-heading">
		<div class="col-lg-pull-12">
			<ol class="breadcrumb">
				<li><a href="javascript:void(0)" ng-click="goBack()">商户</a></li>
				<li class="active" ng-bind="breadcrumb"></li>
			</ol>
		</div>
	</div>
	<form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate
		  ng-if="model.merchant_id==''">
		<div class="form-group form-group-sm">
			<label class="col-sm-2 control-label">商户名称</label>
			<div class="col-sm-3">
				<input type="text" name="merchantName" class="form-control " ng-model="model.merchantName" required>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<label class="col-sm-2 control-label">商户简称</label>
			<div class="col-sm-3">
				<input type="text" name="shortName" class="form-control " ng-model="model.shortName" required>
			</div>
		</div>
		<div class="form-group form-group-sm" ng-if="model.id>0">
			<label class="col-sm-2 control-label">商户所属省</label>
			<div class="col-sm-3">
				<input type="text" name="merchantProvince" class="form-control " ng-model="model.merchantProvince" required>
			</div>
			<div class="col-sm-3">
				<input type="text" name="merchantProvince" class="form-control " ng-model="model.merchantProvince" required>
			</div>
			<div class="col-sm-3">
				<input type="text" name="merchantProvince" class="form-control " ng-model="model.merchantProvince" required>
			</div>
		</div>
		<div class="form-group form-group-sm" ng-if="model.id==0">
			<label class="col-sm-2 control-label">密码</label>
			<div class="col-sm-3">
				<input type="text" name="password" class="form-control " ng-model="model.password" required>
			</div>
		</div>
		<div class="form-group form-group-sm" ng-if="model.id==0">
			<label class="col-sm-2 control-label">确认密码</label>
			<div class="col-sm-3">
				<input type="text" name="re_password" class="form-control " ng-model="model.re_password" required>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<label class="col-sm-2 control-label">状态</label>
			<div class="col-sm-10">
				<div class="checkbox">
					<label>
						<input type="checkbox" name="disabled" ng-model="model.disabled"> 禁用
					</label>
				</div>
			</div>
		</div>
		<div class="form-group form-group-sm" ng-if="model.id>0" ng-init="model.setting.payments.length==0?model.setting.payments=payments:null">
			<label class="col-sm-2 control-label">备注</label>
			<div class="col-sm-6">
				<textarea name="remark" class="form-control" ng-model="model.remark">{{model.remark}}</textarea>
			</div>
		</div>
		<div class="form-group form-group-sm">
			<label class="col-sm-2 control-label"></label>
			<div class="col-sm-3">
				<button type="submit" w5c-form-submit="save_merchant()" class="btn btn-primary btn-sm" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
					<i class="fa fa-save"></i> 保存
				</button>
				<button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
			</div>
		</div>
	</form>
</div>
